﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using CPETwit.WPFClient.Business.TwitterServiceReference;
using CPETwit.WPFClient.Common;

namespace CPETwit.WPFClient.Converter
{
    public class UserToPublishersCountConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if(value is User)
            {
                User user = value as User;
                return CommonData.GetPublishersCount(user);
            }
            return null;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
